<template>
    <div id="app">

        <!--要  缓存的路由-->
        <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
        </keep-alive>

        <!--不  缓存的路由-->
        <router-view v-if="!$route.meta.keepAlive"></router-view>

    </div>
</template>

<script>

export default {
    created () {
        this.$store.commit('initUser');
        // console.log(this.$store.state.path.tabBar);
        // 不可以使用vuex解决，可以使用localStorage解决
        console.log(this.$router.path);
        // if (this.$router.path !== '/home') {
        //     this.$router.replace('/home')
        // }
    }
}
</script>

<style>
* {
    touch-action: pan-y;
}
</style>